package easy;

public class _520_检测大写字母 {
    public boolean detectCapitalUse(String word) {
        if(word.length()>=2 && Character.isLowerCase(word.charAt(0)) && Character.isUpperCase(word.charAt(1))){
            return false;
        }

        for(int i = 2; i < word.length(); i++){
            if(Character.isUpperCase(word.charAt(1)) && Character.isLowerCase(word.charAt(i)) || Character.isLowerCase(word.charAt(1))&& Character.isUpperCase(word.charAt(i))){
                return false;
            }
        }
        return true;
    }
}
